package com.crm.exception;

import com.crm.enumeration.ResultCodeEnum;

/**
 * 基础异常
 *
 * @author
 */
public class BaseException extends RuntimeException {
    private Integer code;

    public BaseException(Integer code, String message){
        super(message);
        this.code = code;
    }

    public BaseException(ResultCodeEnum resultCodeEnum){
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
    }
}
